package com.easylinkin.linkappapi.lobar.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.easylinkin.linkappapi.common.model.RequestModel;
import com.easylinkin.linkappapi.lobar.dto.CompanyTree;
import com.easylinkin.linkappapi.lobar.dto.LaborCompanyProjectDTO;
import com.easylinkin.linkappapi.lobar.dto.excel.ExcelResultDTO;
import com.easylinkin.linkappapi.lobar.entity.LaborCompanyProject;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import org.springframework.web.multipart.MultipartFile;
import site.morn.rest.RestMessage;

/**
 * <p>
 * 闸机表 服务类
 * </p>
 *
 * @author kanyuanfeng
 * @since 2022-04-13
 */
public interface LaborCompanyProjectService extends IService<LaborCompanyProject> {

  IPage<LaborCompanyProjectDTO> queryListByPage(RequestModel<LaborCompanyProjectDTO> requestModel);

  /**
   * 增加
   * @param laborCompanyProject
   */
  void insert(LaborCompanyProject laborCompanyProject);

  /**
   * 根据id编辑
   * @param laborCompanyProject
   */
  void updateOne(LaborCompanyProject laborCompanyProject);

  /**
   * @Description: 删除劳务公司（包含批量删除）
   * @author kan yuanfeng
   * @date 2020/11/04 11:42
   */
  void delBatch(Set<String> ids);

  /**
   * 组成一个树
   */
  List<CompanyTree> getTree(String groupName);

  /**
   * @Description: 进退场
   * @author kan yuanfeng
   * @date 2020/11/04 11:42
   */
  void updateStatus(LaborCompanyProject laborCompanyProject);

  /**
   * 批量导入劳务公司
   * type = 1 为覆盖
   */
  ExcelResultDTO importExcel(MultipartFile file, String tenantId,Integer type)
      throws ExecutionException, InterruptedException, Exception;

  RestMessage queryCompanySelect();
}
